package morningcat.study.spring.starter3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.support.ApplicationObjectSupport;
import org.springframework.web.context.support.WebApplicationObjectSupport;

/**
 * XXX
 *
 * @author mengzhang6
 * @date 2018/11/20 12:59
 */
public class ApplicationContextUtils {

    public ApplicationContext getApplicationContext(ApplicationObjectSupport applicationObjectSupport) {
        ApplicationContext context = applicationObjectSupport.getApplicationContext();
        return context;
    }

    public ApplicationContext getApplicationContext2(WebApplicationObjectSupport webApplicationObjectSupport) {
        ApplicationContext context = webApplicationObjectSupport.getApplicationContext();
        return context;
    }

}
